package org.qly.springboot_1.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.qly.springboot_1.domain.Article;
import org.qly.springboot_1.domain.Comment;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ArticleMapper {
    @Select("select * from t_comment where a_id = #{id} ")
    List<Comment> findById(@Param("id") int id);
    @Select("select * from t_article ")
    List<Article> findAll();

}
